/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-04-16
 * Time: 22:19
 */
interface IFlying{
    void fly();
}
interface IRunning{
    void run();
}
interface IClimbing{
    void climb();
}
class constructor{
    public void fly(){
        System.out.println("我会飞！！！");
    }
}

class Hero extends constructor implements IFlying,IClimbing,IRunning{

    @Override
    public void run() {
        System.out.println("我会跑！！！");
    }

    @Override
    public void climb() {
        System.out.println("我会爬！！！");
    }
}

public class TestDemo {

    public static void fun(IRunning x) {
        x.run();
    }

    public static void main(String[] args) {
         Hero hero = new Hero();
         fun(hero);
    }

}
